<?php
/**
 * Created by PhpStorm.
 * User: TianFeng
 * Date: 2017/12/26
 * Time: 10:22
 * 商户基础信息
 */
namespace app\merchant\controller;
use app\merchant\sercive\Enterpriseloansercive;
class  Enterpriseloan extends Common{
    public function _initialize()
    {
        parent::_initialize();
   //     $this->Object = new Enterpriseloan();
    }
    //商户下企业借款列表
    public function index()
   {

        return view('Enterpriseloan/index');
   }
    //企业借款人详情页
    public function show(){
        $UpYun = require(APP_COMMON . 'conf/upyun_config.php');
        $Config = require(MERCHANT_CONF . 'conf/config.php');
        $this->assign([
            'upyun'=>$UpYun['UPYUN_CONFIG']['UPAIYUN'],
            'Config'=>$Config,
        ]);
        return view('Enterpriseloan/show');
    }
    //修改企业寄款人信息
    public function update()
    {
        $UpYun = require(APP_COMMON . 'conf/upyun_config.php');
        $Config = require(MERCHANT_CONF . 'conf/config.php');
        $this->assign([
            'upyun'=>$UpYun['UPYUN_CONFIG']['UPAIYUN'],
            'Config'=>$Config,
        ]);
        return view('Enterpriseloan/update');
    }
    //修改企业借款人信息
    public function doupdate(){

    }
    //添加企业借款人信息
    public function add(){
        $UpYun = require(APP_COMMON . 'conf/upyun_config.php');
        $Config = require(MERCHANT_CONF . 'conf/config.php');
        $this->assign([
            'upyun'=>$UpYun['UPYUN_CONFIG']['UPAIYUN'],
            'Config'=>$Config,
        ]);
        return view('Enterpriseloan/add');
    }
    //保存企业借款人信息
    public function doadd(){
      $company = input('company/a');
      $image = input('image/a');
      $Object = new Enterpriseloansercive();
      $Reply = $Object->add($company,$image);
      if($Reply)
      {

      }else{

      }

    }
}